import base from '/@/api/base';
import axios from '/@//utils/Axios';
import Axios from "/@//utils/Axios";

export function getUsers(): Promise<any> {
	return axios.get(base.users);
}

export function initUserMajor(): Promise<any> {
	return axios.get(base.initUserMajor);
}

export function updateUser(data: any): Promise<any> {
	return axios.post(base.updateUserInfo, data);
}

export function deleteUser(id: string): Promise<any> {
	return axios.post(base.deleteUser, { id });
}

export function addUserInfo(data: any): Promise<any> {
	return axios.post(base.addUserInfo, data);
}

export function resetPassword(id: string): Promise<any> {
	return axios.get(base.resetPassword + '/' + id);
}

export function getCheckUser(): Promise<any> {
	return axios.get(base.getCheckUser);
}

export function userReviewPass(ids: string[]): Promise<any> {
	return axios.post(base.userReviewPass, ids);
}

export function userRefuseJoin(ids: string[]): Promise<any> {
	return axios.post(base.userRefuseJoin, ids);
}

export function getUserInfo(data:any): Promise<any> {
	return Axios.post("backapi/userinfo", data);
}